<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录页面</title>
    <link rel="stylesheet" href="../public/stylesheets/verify.css">
</head>
<body>
    <input id="uname">
    <input>
    <div id="mpanel2" >
    </div>
    <button id="login">登录</button>

</body>
<script type="text/javascript" src="../public/javascripts/jquery.min.js" ></script>
<script type="text/javascript" src="../public/javascripts/verify.js" ></script>
<script>
    
    $(function(){

        $('#mpanel2').codeVerify({
        		type : 1,
		    	width : '330px',
		    	height : '30px',
		    	fontSize : '20px',
		    	codeLength : 4,
		    	btnId : 'login',
		    	ready : function() {
		    	},
		    	success : function() {
					alert('验证匹配！');
					// 发送登录请求
					$.ajax({
						type: "method",
						url: "/user/sgin",
						data: {
							uname:'输入框的值',
							upwd:'输入框的值'
						},
						dataType: "dataType",
						success: function (response) {
							// 登录成功
							// 跳转页面
							
						},
						error:function(err,code){
							
						}
					});
		    	},
		    	error : function() {
		    		alert('验证码不匹配！');
		    	}
		    });
		    
    })
</script>
</html>